package com.test;

public class test01 {
    public static void main(String[] args) {
        role r1 = new role("乔峰",100);
        role r2 = new role("鸠摩智",100);
        while(true)
        {
            r1.attack(r2);
            if(r2.getBlood()==0)
            {
                System.out.println(r2.getName()+"has been accacked by"+r1.getName());
                break;
            }
            r2.attack(r1);
            if(r1.getBlood() == 0)
            {
                System.out.println(r1.getName()+"has been attacked by"+r2.getName());
                break;
            }
        }

    }


}
